package com.ruoyi.web.inventory.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.inventory.mapper.InventoryMapper;
import com.ruoyi.web.inventory.domain.Inventory;
import com.ruoyi.web.inventory.service.IInventoryService;

/**
 * 存货档案Service业务层处理
 * 
 * @author czr
 * @date 2024-08-19
 */
@Service
public class InventoryServiceImpl implements IInventoryService 
{
    @Autowired
    private InventoryMapper inventoryMapper;

    /**
     * 查询存货档案
     * 
     * @param cInvCode 存货档案主键
     * @return 存货档案
     */
    @Override
    public Inventory selectInventoryByCInvCode(String cInvCode)
    {
        return inventoryMapper.selectInventoryByCInvCode(cInvCode);
    }

    /**
     * 查询存货档案列表
     * 
     * @param inventory 存货档案
     * @return 存货档案
     */
    @Override
    public List<Inventory> selectInventoryList(Inventory inventory)
    {
        return inventoryMapper.selectInventoryList(inventory);
    }

    /**
     * 新增存货档案
     * 
     * @param inventory 存货档案
     * @return 结果
     */
    @Override
    public int insertInventory(Inventory inventory)
    {
        return inventoryMapper.insertInventory(inventory);
    }

    /**
     * 修改存货档案
     * 
     * @param inventory 存货档案
     * @return 结果
     */
    @Override
    public int updateInventory(Inventory inventory)
    {
        return inventoryMapper.updateInventory(inventory);
    }

    /**
     * 批量删除存货档案
     * 
     * @param cInvCodes 需要删除的存货档案主键
     * @return 结果
     */
    @Override
    public int deleteInventoryByCInvCodes(String[] cInvCodes)
    {
        return inventoryMapper.deleteInventoryByCInvCodes(cInvCodes);
    }

    /**
     * 删除存货档案信息
     * 
     * @param cInvCode 存货档案主键
     * @return 结果
     */
    @Override
    public int deleteInventoryByCInvCode(String cInvCode)
    {
        return inventoryMapper.deleteInventoryByCInvCode(cInvCode);
    }
}
